#ifndef I_DXRENDERABLE_H
#define I_DXRENDERABLE_H

class IDXRenderable
{
public:
	enum DXRenderType 
	{
		DX_NULLOBJECT = 0,
		DX_3DOBJECT,
		DX_2DOBJECT
	};

private:
	// This is to store the index of what renderable object
	// this IDXRenderable needs, weather it's a 3D or 2D object
	int m_RenderableID;

	//This specifies the type of render object this is: 3D or 2D
	DXRenderType m_renderType;

	//Is the object visible?
	bool m_IsVisible;

	//Does the Object have a shader associated?
	bool m_bHasShaderApplied;

	//If there is an associated shader whats the ID?
	//We can sort by objects having same shaders and transparency
	int m_nShaderID;
public:
	
	IDXRenderable() : m_RenderableID(-1), m_renderType(DX_NULLOBJECT), m_IsVisible(false)	{}
	IDXRenderable(int renderID, DXRenderType renderType) : m_RenderableID(renderID), m_renderType(renderType), m_IsVisible(true) {}

	IDXRenderable(const IDXRenderable& rhs)	
	{	
		this->m_RenderableID = rhs.m_RenderableID;	
		this->m_renderType = rhs.m_renderType;
		this->m_IsVisible = rhs.m_IsVisible;
		this->m_nShaderID = rhs.m_nShaderID;
		this->m_bHasShaderApplied = rhs.m_bHasShaderApplied;
	}

	IDXRenderable& operator=(const IDXRenderable& rhs)
	{
		this->m_RenderableID = rhs.m_RenderableID;
		this->m_renderType = rhs.m_renderType;
		this->m_IsVisible = rhs.m_IsVisible;
		this->m_nShaderID = rhs.m_nShaderID;
		this->m_bHasShaderApplied = rhs.m_bHasShaderApplied;
		return *this;
	}

	~IDXRenderable()/*=0*/	{}	//HACK not abstract for testing

	// Accessors
	int GetRenderID()					{	return m_RenderableID;		}
	DXRenderType GetRenderType()		{	return m_renderType;		}
	bool IsVisible()					{	return m_IsVisible;			}
	int GetShaderID()					{	return m_nShaderID;			}
	bool IsShaderApplied()				{	return m_bHasShaderApplied;	}


	// Mutator
	void SetIsVisible(bool isVisible)	{	m_IsVisible = isVisible;	}
	void SetShaderID(int nShaderID)		{	m_nShaderID = nShaderID;	}
	void SetIsShaderApplied(bool bShaderApplied)	{	m_bHasShaderApplied = bShaderApplied;	}
protected:
};

#endif